package com.csdj.t309.papermanage.controller;

import com.csdj.t309.papermanage.common.WebResult;
import com.csdj.t309.papermanage.entity.TType;
import com.csdj.t309.papermanage.service.ITTypeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/ttype")
public class TTypeController {
    @Resource
    private ITTypeService typeService;

    @ResponseBody
    @GetMapping("selty")
    public WebResult selTy(){
        List<TType> selTyp = typeService.selTy();
        WebResult webResult = new WebResult();
        webResult.putData("selTyp",selTyp);
        return webResult;
    }
}
